package com.zhang;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
//@ConfigurationProperties(prefix = "person")
@PropertySource(value = "classpath:application.properties")
public class Person {

    @Value("${name}")
    //@Value("李四光砸缸")
    private  String name;
    private  String age;
    private  Boolean happy;
    private  List<Object> lists;
    private  Map<String,Object> maps;
    private  Dog dog;

    public Person() {
    }

    public Person(String name, String age, Boolean happy, List<Object> lists,Map<String,Object> maps, Dog dog) {
        this.name = name;
        this.age = age;
        this.happy = happy;
        this.maps = maps;
        this.lists = lists;
        this.dog = dog;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public Boolean getHappy() {
        return happy;
    }

    public void setHappy(Boolean happy) {
        this.happy = happy;
    }

    public List<Object> getLists() {
        return lists;
    }

    public void setLists(List<Object> lists) {
        this.lists = lists;
    }

    public Dog getDog() {
        return dog;
    }

    public void setDog(Dog dog) {
        this.dog = dog;
    }

    public Map<String, Object> getMap() {
        return maps;
    }

    public void setMap(Map<String, Object> maps) {
        this.maps = maps;
    }
}
